package com.myfum.wingplayer.components.containers
{
	import flash.display.DisplayObject;
	
	import mx.core.UIComponent;
	
	public class AbstractContainer extends UIComponent
	{
		public function AbstractContainer()
		{
			super();
			holder = new UIComponent();
			addChild(holder);
		}
		
		/*
		 * playing data
		*/
		internal var _data:Object;
		/*
		 * main container
		*/
		public var holder:UIComponent;
		
		internal var _mute:Boolean = true;
		
		public function getReady():void{
			holder.visible = false;
		}
		public function get isReady():Boolean{
			return false;
		}
		public function play():void{
			holder.visible = true;
		}
		public function stop():void{
			holder.visible = false;
		}
		public function set data(value:Object):void{_data = value;}
		public function get data():Object{return _data;}
		
		public function dispose():void{
			while(holder.numChildren>0){
				var obj:DisplayObject = holder.removeChildAt(0);
				obj = null;
			}
		}
		
		public function set mute(value:Boolean):void{
			_mute = value;
		}
		
		public function get mute():Boolean{
			return _mute;
		}
	}
}